package com.micromall.model;

import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 系统接口调用日志 SYS_API_LOG
 * </p>
 *
 * @author Dante Fung
 * @since 2017-08-02
 */
@TableName("SYS_API_LOG")
public class SysApiLog extends Model<SysApiLog> {

	public static String INSERT_NEW_RECORD  = "INSERT INTO SYS_API_LOG(LOG_ID,X_ID,CLIENT_IP,API_MODULE,API_USER,INPUT_DATA,OPERATE_TIME) VALUES(seq_sys_api_log.nextval,'%s','%s','%s','%s','%s',to_date('%s','YYYY/MM/DD HH24:MI:SS'))";

    private static final long serialVersionUID = 1L;

    /**
     * 流水号 X_ID
     */
	@TableField("X_ID")
	private String xId;
    /**
     * 调用时间 OPERATE_TIME
     */
	@TableField("OPERATE_TIME")
	private Date operateTime;
    /**
     * 传入数据 INPUT_DATA
     */
	@TableField("INPUT_DATA")
	private String inputData;
    /**
     * 接口用户 API_USER
     */
	@TableField("API_USER")
	private String apiUser;
    /**
     * 客户IP CLIENT_IP
     */
	@TableField("CLIENT_IP")
	private String clientIp;
    /**
     * 调用接口 API_MODULE
     */
	@TableField("API_MODULE")
	private String apiModule;
    /**
     * 日志ID LOG_ID
     */
	@TableField("LOG_ID")
	private String logId;


	public String getxId() {
		return xId;
	}

	public void setxId(String xId) {
		this.xId = xId;
	}

	public Date getOperateTime() {
		return operateTime;
	}

	public void setOperateTime(Date operateTime) {
		this.operateTime = operateTime;
	}

	public String getInputData() {
		return inputData;
	}

	public void setInputData(String inputData) {
		this.inputData = inputData;
	}

	public String getApiUser() {
		return apiUser;
	}

	public void setApiUser(String apiUser) {
		this.apiUser = apiUser;
	}

	public String getClientIp() {
		return clientIp;
	}

	public void setClientIp(String clientIp) {
		this.clientIp = clientIp;
	}

	public String getApiModule() {
		return apiModule;
	}

	public void setApiModule(String apiModule) {
		this.apiModule = apiModule;
	}

	public String getLogId() {
		return logId;
	}

	public void setLogId(String logId) {
		this.logId = logId;
	}

	@Override
	protected Serializable pkVal() {
		return this.xId;
	}

}
